import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        },
        {
            path:"/",
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta:{ title:'自述文件'},
            children:[
                {
                    path: '/updatelogoimg',
                    component: () => import(/* webpackChunkName: "login" */ '../components/oneself/updateLogo.vue'),
                    meta: { title: '修改头像' }
                },
                {
                    path: '/updatepassword',
                    component: () => import(/* webpackChunkName: "login" */ '../components/oneself/updatePassword.vue'),
                    meta: { title: '修改密码' }
                },
                {
                    path: '/dashboard',
                    component: () => import(/* " */ '../components/Crm/Dashboard.vue'),
                    meta: { title: '首页' } 
                },
                {
                    path: 'lifeinfo',
                    component: () => import(/*  */ '../components/Crm/LifeInfo.vue'),
                    meta: { title: '生活信息' },
                    children:[{
                        path:'/',
                        component:() => import('../components/yyg/findlife.vue'),
                        meta:{title:'查看生活信息'}
                    },
                    
                ]    
                },

                {
                    path: '/nb',
                    component: () => import(/*  */ '../components/Crm/Nb.vue'),
                    meta: { title: '管理员的管理员', permission: true }   
                },
                {
                    path: '/oldstu',
                    component: () => import(/*  */ '../components/Crm/OldStu.vue'),
                    meta: { title: '往届学员' }   
                },
                {
                    path: '/stumain',
                    component: () => import(/*  */ '../components/Crm/StuMain.vue'),
                    meta: { title: '学员信息' }   
                },
                {
                    path: '/stumanager',
                    component: () => import(/*  */ '../components/Crm/StuManager.vue'),
                    meta: { title: '学生管理' },
                    children:[{
                        path:'/findmanager',
                        component:() => import('../components/yyg/findmanager.vue'),
                        meta:{title:'学员信息'}
                    },
                   
                    {
                        path:'/',
                        component:() => import('../components/yyg/index.vue'),
                        meta:{title:'所有学员的部分信息'}
                    }
                ]  
                },


                {
                    path: '/addclass',
                    component: () => import(/*  */ '../components/CrmBaby/AddClass.vue'),
                    meta: { title: '班级添加' }   
                },
                {
                    path: '/addlife',
                    component: () => import(/*  */ '../components/CrmBaby/AddLife.vue'),
                    meta: { title: '生活信息添加' }   
                },
                {
                    path: '/addmanager',
                    component: () => import(/*  */ '../components/CrmBaby/AddManager.vue'),
                    meta: { title: '添加管理员' }   
                },
                {
                    path: '/findclass',
                    component: () => import(/*  */ '../components/CrmBaby/FindClass.vue'),
                    meta: { title: '查找班级' }   
                },
                {
                    path: '/classallinfo',
                    component: () => import(/*  */ '../components/CrmBaby/ClassAllinfo.vue'),
                    meta: { title: '班级详情' }   
                },
                {
                    path: '/deletemanager',
                    component: () => import(/*  */ '../components/CrmBaby/DeleteManager.vue'),
                    meta: { title: '删除管理员' }   
                },
                {
                    path: '/stuclass',
                    component: () => import(/*  */ '../components/CrmBaby/StuClass.vue'),
                    meta: { title: '班级查找' }   
                },
                {
                    path: '/stubasic',
                    name:'stubasic',
                    component: () => import(/*  */ '../components/CrmBaby/StuBasic.vue'),
                    meta: { title: '学生基本信息查询' }   
                },
                {
                    path: '/stuclass',
                    name:"stuclass",
                    component: () => import(/*  */ '../components/CrmBaby/StuClass.vue'),
                    meta: { title: '学生班级查询' }   
                },
                {
                    path: '/stusource',
                    name:"stusource",
                    component: () => import(/*  */ '../components/CrmBaby/StuSource.vue'),
                    meta: { title: '学生来源查询' }   
                },
                {
                    path: '/updateclass',
                    name: 'updateclass',
                    component: () => import(/*  */ '../components/CrmBaby/UpdateClass.vue'),
                    meta: { title: '修改班级' }   
                },
                {
                    path: '/pay',
                    name: 'pay',
                    component: () => import(/*  */ '../components/pay/pay.vue'),
                    meta: { title: '缴费信息' }   
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
            ]
        },
        // {
        //     path: '/',
        //     component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
        //     meta: { title: '自述文件' },
        //     children: [
        //         {
        //             path: '/dashboard',
        //             component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
        //             meta: { title: '系统首页' }
        //         },
        //         {
        //             path: '/icon',
        //             component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
        //             meta: { title: '自定义图标' }
        //         },
        //         {
        //             path: '/table',
        //             component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
        //             meta: { title: '基础表格' }
        //         },
        //         {
        //             path: '/tabs',
        //             component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
        //             meta: { title: 'tab选项卡' }
        //         },
        //         {
        //             path: '/form',
        //             component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
        //             meta: { title: '基本表单' }
        //         },
        //         {
        //             // 富文本编辑器组件
        //             path: '/editor',
        //             component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
        //             meta: { title: '富文本编辑器' }
        //         },
        //         {
        //             // markdown组件
        //             path: '/markdown',
        //             component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
        //             meta: { title: 'markdown编辑器' }
        //         },
        //         {
        //             // 图片上传组件
        //             path: '/upload',
        //             component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
        //             meta: { title: '文件上传' }
        //         },
        //         {
        //             // vue-schart组件
        //             path: '/charts',
        //             component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
        //             meta: { title: 'schart图表' }
        //         },
        //         {
        //             // 拖拽列表组件
        //             path: '/drag',
        //             component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
        //             meta: { title: '拖拽列表' }
        //         },
        //         {
        //             // 拖拽Dialog组件
        //             path: '/dialog',
        //             component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
        //             meta: { title: '拖拽弹框' }
        //         },
        //         {
        //             // 国际化组件
        //             path: '/i18n',
        //             component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
        //             meta: { title: '国际化' }
        //         },
        //         {
        //             // 权限页面
        //             path: '/permission',
        //             component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
        //             meta: { title: '权限测试', permission: true }
        //         },
        //         {
        //             path: '/404',
        //             component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
        //             meta: { title: '404' }
        //         },
        //         {
        //             path: '/403',
        //             component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
        //             meta: { title: '403' }
        //         },
        //         {
        //             path: '/donate',
        //             component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
        //             meta: { title: '支持作者' }
        //         }
        //     ]
        // },

    ]
});
